import { deleted, get, post, put ,upload} from "@/api/client";

/**
 * 登录
 * @param user
 * @returns {*}
 */
export function login(user) {
	return post("/system/login", user);
}

/**
 * 退出登入
 * @returns {*}
 */
export function logout(){
	return get("/system/logout");
}

/**
 * 注册
 * @param user
 * @returns {*}
 */
export function register(user){
	return post("/system/register",user);
}


export const getSystemConfigDetail = () => {
	return get(`/system/systemConfig/detail`);
};

/**
 * @param email 邮箱
 * @returns {*}
 */
export const getEmailCode = (email) =>{
	return get(`/system/getEmailCode`,email)
};

/**
 * @param data 修改密码的参数
 * @returns {*}
 */
export const changePassword = (data) =>{
	return post(`/system/changePassword`,data)
}


// 简单上传文件
export const easyUpload= (data) =>{
	return upload(`/system/file/local/easyUpload`,data)
}
